package cheqex.update.controllers;

import java.util.List;

import cheqex.dao.DepositCash;
import cheqex.dao.DepositCashPeer;
import cheqex.dao.DepositCheck;
import cheqex.dao.DepositCheckPeer;
import cheqex.dao.CollectionCash;
import cheqex.dao.CollectionCashPeer;
import cheqex.dao.CollectionCheck;
import cheqex.dao.CollectionCheckPeer;
import cheqex.dao.Withdrawals;
import cheqex.dao.WithdrawalsPeer;

public class FilterSearchController {
	public static List<DepositCash> filterDepositCashByORNo(String orNumber) {
		return DepositCashPeer.filterDepositCashByORNo(orNumber);
	}
	
	public static List<DepositCash> filterDepositCashByORDate(java.sql.Date orDate) {
		return DepositCashPeer.filterDepositCashByORDate(orDate);
	}
	
	public static List<DepositCheck> filterDepositCheckByPRNo(String prNumber) {
		return DepositCheckPeer.filterDepositCheckByPRNo(prNumber);
	}
	
	public static List<DepositCheck> filterDepositCheckByPRDate(java.sql.Date prDate) {
		return DepositCheckPeer.filterDepositCheckByPRDate(prDate);
	}
	
	public static List<Withdrawals> filterWithdrawalsByCheckNo(String checkNumber) {
		return WithdrawalsPeer.filterWithdrawalsByCheckNo(checkNumber);
	}
	
	public static List<Withdrawals> filterWithdrawalsByCheckDate(java.sql.Date checkDate) {
		return WithdrawalsPeer.filterWithdrawalsByCheckDate(checkDate);
	}
	
	public static List<DepositCash> searchDepositCashParticular(String orNumber, java.sql.Date orDate){
		return DepositCashPeer.searchDepositCashParticular(orNumber, orDate);
	}

	public static List<CollectionCash> searchCollectionCashParticular(String orNumber, java.sql.Date orDate){
		return CollectionCashPeer.searchCollectionCashParticular(orNumber, orDate);
	}
	
	public static List<DepositCheck> searchDepositCheckParticular(String prNumber, java.sql.Date prDate){
		return DepositCheckPeer.searchDepositCheckParticular(prNumber, prDate);
	}

	public static List<CollectionCheck> searchCollectionCheckParticular(String prNumber, java.sql.Date prDate){
		return CollectionCheckPeer.searchCollectionCheckParticular(prNumber, prDate);
	}

	public static List<Withdrawals> searchWithdrawalsParticular(String checkNumber, java.sql.Date checkDate){
		return WithdrawalsPeer.searchWithdrawalsParticular(checkNumber, checkDate);
	}

	public static boolean isNumeric(String input){ //checks if number
		try 
		{
			 char[] ch = input.toCharArray(); 
			 for(int i = 0; i < input.length();i++) {
		            if( Character.isDigit(ch[i]) ) 
		            	continue; 
		            else return false;
			 }
			 return true;
		}catch (NumberFormatException nfe) {
			nfe.printStackTrace();
			return false;
		}
	
	}

}